package com.hechi.demo.mapper;

import com.hechi.demo.entity.Doctor;
import org.apache.ibatis.annotations.Select;

public interface DoctorMapper {
    int deleteByPrimaryKey(Integer docId);

    int insert(Doctor record);

    int insertSelective(Doctor record);

    Doctor selectByPrimaryKey(Integer docId);

    @Select("select docId, docCode, realName, password, sex, deptno, secretProtect from doctor where docCode=#{docCode}")
    Doctor selectByDocCode(String docCode);  //我们已经在字段上设置了唯一，确保查出来的是单个对象

    int updateByPrimaryKeySelective(Doctor record);

    int updateByPrimaryKey(Doctor record);
}